package com.dd.cloud.user.entity.pres;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 处方表
 * </p>
 *
 * @author czg
 * @since 2022-04-27
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "处方表")
public class PresPrescription implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 处方编码 患者处方表
     */
    @TableId(value = "tencode", type = IdType.INPUT)
    @Column(isKey = true)
    private String tencode;

    /**
     * 诊断id
     */
    @Column(comment = "诊断id, 没有此id表明是手动开方")
    private Integer diagnosticId;

    /**
     * 问诊id
     */
    @Column(comment = "问诊id, 没有此id表明是线下开方")
    private Integer consultId;

    /**
     * 诊断id
     */
    @Column(comment = "药房id")
    private Integer pharmId;

    /**
     * 医生id
     */
    @Column(comment = "医生id")
    private Integer doctorId;

    /**
     * 审核医生id
     */
    @Column(comment = "审核医生id")
    private Integer reviewDoctorId;

    /**
     * 是否ai开方
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "是否ai开方 1是 0否")
    private Integer isAiPres;

    /**
     * 就诊卡id
     */
    @Column(length = 30, comment = "就诊卡id")
    private String medId;

    /**
     * 姓名
     */
    @Column(length = 20, comment = "姓名")
    private String name;

    /**
     * 年龄
     */
    @Column(length = 10, comment = "年龄")
    private String age;

    /**
     * 性别
     */
    @Column(length = 10, comment = "性别")
    private String sex;

    /**
     * 婚姻
     */
    @Column(length = 10, comment = "婚姻")
    private String maritalStatus;

    /**
     * 如果是女性角色, 是否怀孕 0否 1是
     */
    @Column(defaultValue = "0", length = 1, comment = "如果是女性角色, 是否怀孕 0否 1是")
    private Integer pregnant;

    /**
     * 手机号
     */
    @Column(length = 20, comment = "手机号")
    private String phoneNum;

    /**
     * 联系地址
     */
    @Column(length = 20, comment = "联系地址")
    private String contactAddr;

    /**
     * 科室名
     */
    @Column(length = 20, comment = "科室名")
    private String departmentName;

    /**
     * 疾病名
     */
    @Column(length = 20, comment = "疾病名")
    private String diseaseName;

    /**
     * 症状
     */
    @Column(length = 1500, comment = "症状")
    private String symptomList;

    /**
     * 民族
     */
    @Column(length = 11, comment = "民族")
    private String ethnicity;

    /**
     * 处方状态
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "处方状态")
    private Integer status;

    /**
     * 每日剂数
     */
    @Column(comment = "每日剂数")
    private Integer dayDose;

    /**
     * 总剂数
     */
    @Column(comment = "总剂数")
    private Integer allDose;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private LocalDateTime createDate;

    /**
     * 更新时间
     */
    @Column(comment = "更新时间")
    private LocalDateTime updateDate;

    /**
     * 备注
     */
    @Column(type = MySqlTypeConstant.TEXT, comment = "备注")
    private String remark;

    /**
     * 每剂次数
     */
    @Column(comment = "每剂次数")
    private Integer doseNum;

    /**
     * 每剂药材量 默认180 单位ml
     */
    @Column(comment = "每剂药材量")
    private Integer drugDose;

    /**
     * 医嘱
     */
    @Column(length = 500, comment = "医嘱")
    private String advice;

    /**
     * 疗期医嘱
     */
    @Column(length = 500, comment = "疗期医嘱")
    private String treatAdvice;

    /**
     * 用法补充
     */
    @Column(length = 200, comment = "用法补充")
    private String drugUsage;

    /**
     * 快递单号
     */
    @Column(length = 20, comment = "快递单号")
    private String expressno;

    /**
     * 快递公司
     */
    @Column(length = 10, comment = "快递公司")
    private String expresscompany;

    /**
     * 药品金额 必填
     */
    @Column(comment = "药品金额")
    private Integer money;

    /**
     * 折扣药品金额
     */
    @Column(comment = "折扣药品金额")
    private Integer discountMoney;

    /**
     * 诊疗费 必填
     */
    @Column(comment = "诊疗费")
    private Integer consultationFee;

    /**
     * 服务费 必填
     */
    @Column(comment = "服务费")
    private Integer serviceFee;

    /**
     * 物流费 必填
     */
    @Column(comment = "物流费")
    private Integer expensesFee;

    /**
     * 代煎费 必填
     */
    @Column(comment = "代煎费")
    private Integer fryingFee;

    /**
     * 签名
     */
    @Column(length = 128, comment = "签名")
    private String sign;

    /**
     * 二次签名
     */
    @Column(length = 128, comment = "二次签名")
    private String confirmSign;

    /**
     * 签名-审核医生
     */
    @Column(length = 128, comment = "签名-审核医生")
    private String reviewSign;

    /**
     * 二次签名-审核医生
     */
    @Column(length = 128, comment = "二次签名-审核医生")
    private String reviewConfirmSign;

    /**
     * 处方pdf链接
     */
    @Column(length = 128, comment = "处方pdf链接")
    private String pdfUrl;

    /**
     * 加工类型
     */
    @Column(comment = "加工类型")
    private Integer type;

    /**
     * 膏方/蜂蜜费总费用
     */
    @Column(comment = "预计出粉量", length = 32)
    private String outPut;

    /**
     * 出量天数
     */
    @Column(comment = "预计出粉天数", length = 32)
    private String useDay;

    /**
     * 膏方/蜂蜜费用
     */
    @Column(comment = "膏方/蜂蜜费用 单位分")
    private Integer otherFee;


    /**
     * 目数
     */
    @Column(comment = "粉剂目数")
    private String num;

    /**
     * 快递是否显示
     */
    @Column(comment = "快递方式 0.不显示 1.显示到付")
    private Integer deliveryIsDisplay;

    /**
     * 起订量
     */
    @Column(comment = "起订量")
    private String minWeight;

    /**
     * 地址快照
     */
    @Column(comment = "地址", length = 256)
    private String address;

    /**
     * 药品原价
     */
    @Column(comment = "处方药品原价")
    private Integer presOriginalMoney;

    /**
     * 膏方/蜂蜜原价费用
     */
    @Column(comment = "膏方/蜂蜜费用 单位分")
    private Integer otherOriginalFee;

    /**
     * 来源类型 1医生处方 2智能处方 3医生处方(问诊) 4智能处方(问诊)
     */
    @Column(comment = "来源类型 1医生处方 2智能处方 3医生处方(问诊) 4智能处方(问诊)")
    private Integer sourceType;

    /**
     * 中医诊断名
     */
    @Column(comment = "中医诊断名", length = 50)
    private String zyName;

    /**
     * 中医诊断编码
     */
    @Column(comment = "中医诊断编码", length = 20)
    private String zyCode;

    /**
     * 中医诊断
     */
    @Column(comment = "中医诊断", length = 128)
    private String diagnosticName;

    /**
     * 过敏史
     */
    @Column(comment = "过敏史", length = 256)
    private String drugAllergyHistory;

    /**
     * 是否显示药品 0否 1是
     */
    @Column(comment = "是否显示药品 0否 1是", defaultValue = "1")
    private Integer drugShow;

    /**
     * 是否显示药品用量 0否 1是
     */
    @Column(comment = "是否显示药品用量 0否 1是", defaultValue = "1")
    private Integer drugDoseShow;

    /**
     * 接口请求次数
     */
    @Column(comment = "接口请求次数", defaultValue = "1")
    private Integer tryApiNum;

    /**
     * 线下疾病
     */
    @Column(comment = "线下疾病")
    private String offlineDisease;


    /**
     * 药师开方标志
     */
    @Column(comment = "药师开方标志", defaultValue = "0")
    private Integer flag;

    /**
     * 用药方式
     */
    @Column(comment = "用药方式", length = 32)
    private String useDrugWay;

    /**
     * 无权处方审核标识
     */
    @Column(comment = "无处方权医生开方标识", length = 4,defaultValue = "0")
    private Integer isFree;

    /**
     * 是否代煎
     */
    @Column(comment = "是否代煎 0.否 1.是")
    private Integer isFrying;
}
